// 优惠券相关接口
import http from "../common/http.js";

export default {
  //领券中心
  couponList: (data, needLoading) => {
    return http.GET("/default/coupon-list", data, needLoading);
  },
  //我的优惠券列表
  myCouponList: (data, needLoading) => {
    return http.GET("/coupon/index", data, needLoading);
  },
  //领取优惠券
  receiveConpon: (data, needLoading) => {
    return http.GET("/coupon/receive", data, needLoading);
  },
  //优惠券详情
  couponDetail: (data, needLoading) => {
    return http.GET("/coupon/detail", data, needLoading);
  },
  //充值卡充值
  vscardSubmit: (data, needLoading) => {
    return http.GET("/plugin/vscard/vscard/submit", data, needLoading);
  },
  //核销卡列表
  verifyList: (data, needLoading) => {
    return http.GET("/verify/index", data, needLoading);
  },
  //核销卡详情页
  verifyDetail: (data, needLoading) => {
    return http.GET("/verify/verify-detail", data, needLoading);
  },
  //核销卡使用记录页
  verifyLog: (data, needLoading) => {
    return http.GET("/verify/verify-log", data, needLoading);
  },
  //核销卡核销详情页
  verifyOrder: (data, needLoading) => {
    return http.GET("/verify/verify-order", data, needLoading);
  },
  //核销卡兑换页信息
  verifyExchangeDetail: (data, needLoading) => {
    return http.GET("/verify/verify-exchange-detail", data, needLoading);
  },
  //用户卡券
  userCard: (data, needLoading) => {
    return http.GET("/user/card", data, needLoading);
  },
  //用户卡券二维码
  userCardQrcode: (data, needLoading) => {
    return http.GET("/user/card-qrcode", data, needLoading);
  },
  //用户卡券核销
  userCardClerk: (data, needLoading) => {
    return http.GET("/user/card-clerk", data, needLoading);
  },
  //用户卡券详情
  userCardDetail: (data, needLoading) => {
    return http.GET("/user/card-detail", data, needLoading);
  },
  //绑定新卡
  verifyAdd: (data, needLoading) => {
    return http.POST("/verify/verify-add", data, needLoading);
  },
  //修改卡券密码
  changePass: (data, needLoading) => {
    return http.POST("/verify/verify-change-pass", data, needLoading);
  },
  //卡劵兑换
  verifyExchange: (data, needLoading) => {
    return http.GET("/verify/verify-exchange", data, needLoading);
  },
  // 视频查看

  verifyVideo(data, needLoading) {
    return http.GET("/verify/video", data, needLoading);
  },
  // 储值卡充值
  verifyCash(data, needLoading) {
    return http.GET("/verify/exchange", data, needLoading);
  },
  // 领取卡劵
  verifyReceive(data, needLoading) {
    return http.GET("/verify/receive", data, needLoading);
  },
 // 删除卡券
  deleteCard: (data, needLoading) => {
    return http.GET("/verify/del", data, needLoading);
  },
  // 记录领取优惠券
  recordCouponReceive: (data, needLoading) => {
    return http.GET("/coupon/share", data, needLoading);
  },
  // 核销记录列表
  clerkRecord: (data, needLoading) => {
    return http.GET("/verify/verify-md-log", data, needLoading);
  },
  // 领取赠送的优惠券 
  getShareCoupon: (data, needLoading) => {
    return http.POST("/coupon/share-receive", data, needLoading);
  },
  //核销劵列表
  getWriteIndexList:(data,needLoading)=>{
    return http.GET("/verify/list", data, needLoading);
  },
  //核销劵详情
  getWriteDetail:(data,needLoading)=>{
    return http.GET("/verify/detail", data, needLoading);
  },
  reveiceWirte:(data,needLoading)=>{
    return http.GET("/verify/add-receive", data, needLoading);
  },
};
